/**
 * Company : SIANGKLOM.
 * Created By : Chatree Siangklom
 * Created On : Aug 28, 2013  1:46:12 PM 
 * e-Mail : dr_chatree@hotmail.com
 * Mobile Phone : (+66) 087-921-5115
 * Package Name : com.tis.database.services.security.impl
 * File Name : ActiveDirectoryServicesImpl.java
 * TODO
 */
package com.tis.database.services.security.impl;

import java.util.List;

import org.hibernate.HibernateException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.tis.database.dao.security.AdActiveDirectoryDao;
import com.tis.database.entitys.security.AdActiveDirectory;
import com.tis.database.services.security.IActiveDirectoryServices;

/**
 * @author Administrator
 *
 */
@Service
@Transactional(readOnly = true)
public class ActiveDirectoryServicesImpl implements IActiveDirectoryServices{
	
	@Autowired
	AdActiveDirectoryDao adActiveDirectoryDao;

	/* (non-Javadoc)
	 * @see com.tis.database.services.security.IActiveDirectoryServices#findByCode(java.lang.String)
	 */
	@Override
	public List<AdActiveDirectory> findByCode(String code) throws HibernateException {
		
		return adActiveDirectoryDao.findByCode(code);
	}

	/* (non-Javadoc)
	 * @see com.tis.database.services.security.IActiveDirectoryServices#findByAdName(java.lang.String)
	 */
	@Override
	public List<AdActiveDirectory> findByAdName(String adName) throws HibernateException{
		
		return adActiveDirectoryDao.findByAdName(adName);
	}

	/* (non-Javadoc)
	 * @see com.tis.database.services.security.IActiveDirectoryServices#findByName(java.lang.String)
	 */
	@Override
	public List<AdActiveDirectory> findByName(String name) throws HibernateException{
		
		return adActiveDirectoryDao.findByName(name);
	}

	/* (non-Javadoc)
	 * @see com.tis.database.services.security.IActiveDirectoryServices#findByDescription(java.lang.String)
	 */
	@Override
	public List<AdActiveDirectory> findByDescription(String description) throws HibernateException{
		
		return adActiveDirectoryDao.findByDescription(description);
	}

	/* (non-Javadoc)
	 * @see com.tis.database.services.security.IActiveDirectoryServices#findByIsActive(java.lang.String)
	 */
	@Override
	public List<AdActiveDirectory> findByIsActive(String isactive) throws HibernateException{
		
		return adActiveDirectoryDao.findByIsActive(isactive);
	}

	/* (non-Javadoc)
	 * @see com.tis.database.services.security.IActiveDirectoryServices#findByIsDelete(java.lang.String)
	 */
	@Override
	public List<AdActiveDirectory> findByIsDelete(String isdeleted) throws HibernateException{
		
		return adActiveDirectoryDao.findByIsDelete(isdeleted);
	}

	/* (non-Javadoc)
	 * @see com.tis.database.services.security.IActiveDirectoryServices#findByStatus(java.lang.String)
	 */
	@Override
	public List<AdActiveDirectory> findByStatus(String status) throws HibernateException{
		
		return adActiveDirectoryDao.findByStatus(status);
	}
	
	

}
